import request from '@/axios/request';

enum Api {
    GETDATA_EU_REWORK = '/picking/eu_rework',
    SUBMIT_ONE_EU_REWORK = '/picking/submitone_eu_rework',
    SUBMIT_ALL_EU_REWORK = '/picking/submit_all_eu_rework',
    GETECHART_DATA = '/picking/echartdata',
}
// 获取欧盟返工数据
export function getDataEURework(page: number, page_size: number) {
    return request.get(Api.GETDATA_EU_REWORK+`?page=${page}&page_size=${page_size}`);
}

// 提交单条欧盟返工单
export function submitOneEURework(data: any) {
    return request.post(Api.SUBMIT_ONE_EU_REWORK, data);
}

// 提交多条欧盟返工单
export function submitAllEURework(data: any) {
    return request.post(Api.SUBMIT_ALL_EU_REWORK, data);
}

// 获取欧盟返工单的echart数据
export function getEchartData() {
    return request.get(Api.GETECHART_DATA);
}